import request from '@/config/axios'

// 参加活动 VO
export interface ParticipateActivitiyVO {
  id: number // 编号
  studentId: number // 学生编号
  activityId: number // 活动编号
}

// 参加活动 API
export const ParticipateActivitiyApi = {
  // 查询参加活动分页
  getParticipateActivitiyPage: async (params: any) => {
    return await request.get({ url: `/td/participate-activitiy/page`, params })
  },

  // 查询参加活动详情
  getParticipateActivitiy: async (id: number) => {
    return await request.get({ url: `/td/participate-activitiy/get?id=` + id })
  },

  // 新增参加活动
  createParticipateActivitiy: async (data: ParticipateActivitiyVO) => {
    return await request.post({ url: `/td/participate-activitiy/create`, data })
  },

  // 修改参加活动
  updateParticipateActivitiy: async (data: ParticipateActivitiyVO) => {
    return await request.put({ url: `/td/participate-activitiy/update`, data })
  },

  // 删除参加活动
  deleteParticipateActivitiy: async (id: number) => {
    return await request.delete({ url: `/td/participate-activitiy/delete?id=` + id })
  },

  // 导出参加活动 Excel
  exportParticipateActivitiy: async (params) => {
    return await request.download({ url: `/td/participate-activitiy/export-excel`, params })
  },
}